<?php
/* Custom API function to extract all products configoptions from tblproducts */
if( preg_match('/^\d+$/', $_POST['name']) ) {
$resource_id= mysql_query("INSERT INTO tblproductgroups VALUES('$_POST['id']','$_POST['name']','$_POST['disabledgateways']','$_POST['hidden']','$_POST['order']')");
echo $resource_id;
$rows = mysql_num_rows($resource_id);
$xml = array();
$xml[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$xml[] = "<whmcsapi version=\"5.1.3\">\n";
$xml[] = "<action>productgroup</action>\n";
$xml[] = "</whmcsapi>";
echo join("\n", $xml);

?>